﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Login.ascx.cs" Inherits="Login" %>
 <%if (Session["user"]!=null)
          { %>
        <table width="100%" height="200" border="0" cellspacing="0" cellpadding="1"  style="background-color:#fff;" >
          <tr>
            <td colspan="3" align="center" ><img src="images/login.jpg" width="93" height="34" /></td>
          </tr>
          <tr>
            <td align="right" style="width: 387px">欢迎用户</td>
            <td colspan="2" align="left" class="category" style="width: 332px"><%=Session["user"].ToString()%>
                &nbsp;</td>
          </tr>
          <tr><td colspan="2"><hr style="color:Gray;" /></td></tr>
          <tr>
            <td align="center" class="category" style="width: 387px; height: 27px">
                <a href="Buy.aspx">查看购物车</a></td>
            <td colspan="2" align="center"  style="height: 27px; width: 332px;" class="category"><a href="MyCartList.aspx">查看购物清单</a></td>
          </tr>
          <tr>
            <td align="center" class="category" style="width: 387px; height: 32px;">
                  <a href="Account.aspx">帐户余额</a></td>
     
            <td align="center" valign=middle class="category" style="height: 32px; width: 517px;">
                 <a href="ChangePwd.aspx">修改密码</a></td>
          </tr>
           <tr>
            <td align="center" class="category" style="width: 387px; height: 32px;">
               <a href="LoginOut.aspx"> 退出登录</a></td>
            <td colspan="2" class="category" align=left style="height: 32px; width: 332px;"></td>
          </tr> </table>
           <%
          }
          else
          {%>   
        <table width="100%" height="200" border="0" cellspacing="0" cellpadding="1" style="background-color:#fff;"  >
          <tr>
            <td colspan="3" align="left" ><img src="images/login.jpg" width="93" height="34" /></td>
          </tr>
          <tr>
            <td align="center"  style="width: 72px; height: 32px;">
                用户:</td>
            <td colspan="2" align="left"  style="height: 32px">
            <asp:TextBox ID="userId" runat="server" CssClass="login"   Width="110px"></asp:TextBox></td>
          </tr>
          <tr>
            <td align=center  style="width: 72px; height: 27px">密码:</td>
            <td colspan="2" align="left"  style="height: 27px"><asp:TextBox ID="password" runat="server" CssClass="login"  TextMode="Password" Width="110px"></asp:TextBox></td>
          </tr>
          <tr>
            <td align="center"  style="width: 72px; height: 32px;">验证:</td>
            <td align="left"  style="height: 32px; width: 29px;"><asp:TextBox ID="checkCode" runat="server" CssClass="code"   Width="49px"  ></asp:TextBox></td>
            <td align="left" valign=middle  style="height: 32px; width: 517px;"><span  style="height: 32px"><img src="images.aspx" id="yzm" name="yzm"   onclick="document.getElementById('yzm').src='images.aspx?temp='+ (new Date().getTime().toString(36)); return false" alt="请输入验证码,看不清楚？点击换一个" height="22" width="55" /></span></td>
          </tr>
           <tr>
            <td align="right"  style="width: 72px; height: 32px;">
                <asp:Button ID="btLogin" runat="server" Text="登陆" CssClass="submit" OnClick="btLogin_Click" OnClientClick="return Validator.Validate(form1,2);" Width="49px"   /></td>
            <td colspan="2"  align=left style="height: 32px">&nbsp;<asp:Button ID="btReg" runat="server" Text="注册"  CssClass="submit" Width="51px" OnClick="btReg_Click"  /></td>
          </tr>

        </table>
          <%} %>